﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WorkSummary.Common
{
    public class TopResult
    {
        public int code { get; set; }

        public object info { get; set; }

        /// <summary>
        /// 操作成功
        /// </summary>
        public TopResult()
        {
            code = 0;
            info = "操作成功";
        }
        /// <summary>
        /// 标准返回
        /// </summary>
        /// <param name="r">操作状态码</param>
        /// <param name="o">操作返回结果</param>
        public TopResult(int r,object o) {
            code = r;
            info = o;
        }
        /// <summary>
        /// 操作失败
        /// </summary>
        /// <param name="o">操作失败返回的信息</param>
        public TopResult(object o)
        {
            code = -1;
            info = o;
        }
    }
}
